package server.mapper;

import org.dom4j.Element;

import java.util.List;

public class Conector {
    private List<Element> elementList;
    private String port;
    private Host host;

    public List<Element> getElementList() {
        return elementList;
    }

    public void setElementList(List<Element> elementList) {
        this.elementList = elementList;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public Host getHost() {
        return host;
    }

    public void setHost(Host host) {
        this.host = host;
    }

    Conector(List<Element> elementList){
        this.elementList = elementList;
        host =new Host(elementList);
        for (Element element : elementList) {
            List<Element> conectorList = element.selectNodes("Connector");
            for (Element element1 : conectorList) {
                String port = element1.attributeValue("port");
                this.port =port;
            }
        }
    }
    public Conector(String port) {
        this.port = port;
    }


}
